//
//  SmallView.m
//  HJZWeiBo
//
//  Created by lanou on 16/5/28.
//  Copyright © 2016年 蒋晨成. All rights reserved.
//

#import "SmallView.h"

@implementation SmallView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.button = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button.frame = CGRectMake(0, 0, 60, 60);
        self.button.backgroundColor = [UIColor redColor];
        [self.button setImage:[UIImage imageNamed:@"wenzi"] forState:UIControlStateNormal];
        self.button.layer.cornerRadius = 30;
        [self addSubview:_button];
        
        self.label = [[UILabel alloc]initWithFrame:CGRectMake(0, 60, 60, 30)];
        self.label.text = @"文字";
        self.label.font = [UIFont systemFontOfSize:13];
        self.label.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_label];
        
        self.button2 = [UIButton buttonWithType:UIButtonTypeCustom];
        self.button2.frame = CGRectMake(0, 100, 60, 60);
        self.button2.backgroundColor = [UIColor greenColor];
        [self.button2 setImage:[UIImage imageNamed:@"qiandao"] forState:UIControlStateNormal];
        self.button2.layer.cornerRadius = 30;
        [self addSubview:_button2];
        
        self.label2 = [[UILabel alloc]initWithFrame:CGRectMake(0, 160, 60, 30)];
        self.label2.text = @"位置";
        self.label2.font = [UIFont systemFontOfSize:13];
        self.label2.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_label2];
    }
    return self;
}

@end
